<template>
  <view>
    <base-drawer
        mode="bottom"
        maskClosable mask
        :visible="firstPop.show"
        background-color="transparent" @close="close"
			>
				<view class="pop-box w-full bg--w111-f5f5f5 rd-t-40rpx">
					<view class="text-center py-24">
						<view class="fs-30 fw-bold">首期实付租金</view>
					</view>
					<view class="px-20 main mt-20">
            <view class="item flex-between-center p-20">
              <view class="l">首期租金</view>
              <view class="r fw-bold Regular">
                <text class="mr-10" v-if="is_super">￥0</text>
                <text :class="{'line-money':is_super}">￥{{firstPop.price.firstRent}}</text>
              </view>
            </view>
            <view class="item  flex-between-center p-20">
              <view class="l">运费</view>
              <view class="r">包邮</view>
            </view>
            <view class="item  flex-between-center p-20" >
              <view class="l">优惠券抵扣</view>
              <view class="r text-red fw-bold Regular" v-if="coupon_price>0">-￥{{coupon_price}}</view>
              <view class="r text--w111-999" v-else>无</view>
            </view>
            <view class="item flex-between-center p-20" >
              <view class="l">用户等级优惠</view>
              <view class="r text-red fw-bold Regular" v-if="priceGroup.vipPrice>0">-￥{{parseFloat(priceGroup.vipPrice).toFixed(2)}}</view>
              <view class="r text--w111-999" v-else>无</view>
            </view>
<!--            <view class="item flex-between-center p-20">-->
<!--              <view class="l">平台优惠</view>-->
<!--              <view class="r text-red fw-bold Regular"></view>-->
<!--              <view class="r text&#45;&#45;w111-999">无</view>-->
<!--            </view>-->
					</view>
				</view>
			</base-drawer>
		</view>
</template>

<script>
	import baseDrawer from '@/components/tui-drawer/tui-drawer.vue';
  import moment from "moment";
	export default {
		components: { baseDrawer },
		props: ['firstPop','coupon_price','priceGroup','is_super'],
		data() {
			return {
				now: new Date()
			}
		},
		watch: {
			instal(newVal) {
				if(newVal.show) this.now = new Date()
			}
		},
		methods: {
			close: function () {
				this.$emit('close');
			},
			getTime: function (i) {
        return moment(i).format('YYYY-MM-DD')
			}
		}
	}
</script>

<style lang="scss" scoped>
.pop-box{
  height: 50vh;
  .main{
    .item{

    }
  }
}
</style>